using System;

namespace Mysoft.Dbf.Writers
{
    public class DateFieldWriter : FieldWriterBase
    {
        public DateFieldWriter(string columnName)
            :
            base(columnName, 'D', 8, 0)
        { }

        protected override string FormatValueAsString(object value)
        {
            DateTime valueToWrite = (DateTime)value;
            return valueToWrite.ToString("yyyyMMdd");
        }
    }
}
